<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人中心</title>
<link type="text/css" href="${staticResources}/css/personalcenter.css" rel="stylesheet" />
<script type="text/javascript">
// Resize iframe to full height
function resizeIframe(height)
{
  // "+60" is a general rule of thumb to allow for differences in
  // IE & and FF height reporting, can be adjusted as required..
  document.getElementById('main_frame').height = parseInt(height)+60;
}
</script>
</head>
<body>

<div id="header">
  <div id="hy">
    <c:if test="${user eq null }">
    <div id="logo">欢迎光临中国药科大学二手书交易平台!请<span><a href="${contextPath }/Account/Login">登录</a></span> 免费<span><a href="${contextPath }/Account/Register">注册</a></span></div>
    </c:if>
    <c:if test="${user ne null }">
    <div id="sc">
      <ul>
        <li><a href="${contextPath }/Account/Logout">注销</a></li>
        <li><a href="${contextPath }/Me?content=201">收藏夹</a></li>
        <li><a href="${contextPath }/Me">个人中心</a></li>
        <li>欢迎你，<b>${fn:escapeXml(user.nickName) }</b>！</li>
      </ul>
    </div>
    </c:if>
    
    
  </div>
  <div id="top"><img src="${staticResources}/image/zhuye_04.gif" width="1024" height="153" alt=""></div>
  <div id="nav" style="background:url(${staticResources}/image/zhuye_06.gif)">
    <ul>
      <li><a href="${contextPath }/Homepage">首页</a></li>
      <li><a href="${contextPath }/Books/Search">交易广场</a></li>
      <li><a href="${contextPath }/Auctions/Search">拍卖中心</a></li>
      <li><a href="#">读者推荐</a></li>
      <li><a href="${contextPath }/Comment/ListComments">留言板</a></li>
      <li><a href="#">新手指南</a></li>
    </ul>
  </div>
</div>
<!--头部结束-->

<div class="main">
     
     <div class="lmain">
	      <div class="tx">
	        <c:choose>
             <c:when test="${empty user.userPicture }">
               <img src="${staticResources}/image/userpics_none.jpg" width="132" height="132" alt="">
             </c:when>
             <c:otherwise>
               <img src="${userContents}/userpics/${user.userPicture }" width="132" height="132" alt="">
             </c:otherwise>
	       </c:choose>
	      </div>
		  <div class="xx">
		        <dl>活跃度：${user.activityPoint}</dl>
				<dl>信誉度：${user.creditPoint}</dl>
				<dl>个性签名：${fn:escapeXml(user.signature)}</dl>
		  </div>
		  <div class="text">
		       <div class="grey"><b>个人信息</b></div>
			   <div class="det">
			        <dl><a href="?content=101">查看</a></dl>
					<dl><a href="?content=102">修改</a></dl>
					<dl><a href="?content=103">上传头像</a></dl>
					<dl><a href="?content=104">修改密码</a></dl>
			   </div>
			   <div class="grey"><b>收藏夹</b></div>
			   <div class="det">
			        <dl><a href="?content=201">我的收藏</a></dl>
					
			   </div>
			   <div class="grey"><b>我买过</b></div>
			   <div class="det">
					<dl><a href="?content=301">交易中</a></dl>
					<dl><a href="?content=302">交易完成</a></dl>
			   </div>
			   <div class="grey"><b>我卖过</b></div>
			   <div class="det">
			        <dl><a href="?content=401">已上架</a></dl>
					<dl><a href="?content=402">已下架</a></dl>
					<dl><a href="?content=403">拍卖中</a></dl>
			        <dl><a href="?content=404">交易中</a></dl>
					<dl><a href="?content=405">交易完成</a></dl>
			   </div>
		  </div>
	 </div>
	 
	 <c:choose>
	   <c:when test="${param.content eq 101 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Me/ShowMyInfo" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 102 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Me/ChangeMyInfo" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 103 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Me/UploadPortrait" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 104 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Account/changepassword.jsp" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 201 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Books/ShowFavoriteBook" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 301 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Transactions/ShowOngoingAsBuyer" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 302 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Transactions/ShowCompletedAsBuyer" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 401 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Books/ShowBooksByState?state=1" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 402 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Books/ShowBooksByState?state=0" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 403 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Auctions/ShowOngoingAsOwner" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 404 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Transactions/ShowOngoingAsSeller" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:when test="${param.content eq 405 }">
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Transactions/ShowCompletedAsSeller" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:when>
	   <c:otherwise>
	     <iframe id='main_frame' class="rmain2" src="${contextPath }/Me/ShowMyInfo" width="720" frameBorder="0" marginheight="0" scrolling="no" allowTransparency="yes">
	     </iframe>
	   </c:otherwise>
	 </c:choose>
	 
</div>
<!--中间部分结束-->

<div id="bottom"><img src="${staticResources}/image/zhuye_47.gif" width="1024" height="86" alt=""></div>

</body>
</html>